// Defines the precision of the 'real' datatype. 
// Can be single (float) or double-precision. This
// determines which alternative functions we need to
// call in the event of their use, since they vary
// depending on precision format.

// simply change the 'if x' below between 0 and 1 to
// define the appropriate type for the compiler
#pragma once

#include <float.h>

namespace physics {

#if 0
	#define PRECISION_SINGLE
	typedef float real;
	#define REAL_MAX FLT_MAX
	#define real_sqrt sqrtf
	#define real_abs fabsf
	#define real_sin sinf
	#define real_cos cosf
	#define real_exp expf
	#define real_pow powf
	#define real_fmod fmodf
	#define R_PI 3.14159f
#else
	#define DOUBLE_PRECISION
    typedef double real;
    #define REAL_MAX DBL_MAX
    #define real_sqrt sqrt
    #define real_abs fabs
    #define real_sin sin
    #define real_cos cos
    #define real_exp exp
    #define real_pow pow
    #define real_fmod fmod
    #define R_PI 3.14159265358979
#endif
}
